'use strict';
// Copyright 2014 Blueant Inc. All Rights Reserved.

/**
 * @fileoverview 竞技场
 * @author agl
 */

var acEnterBattle = require('./actCarbon/enterBattle.js');
var acExitBattle = require('./actCarbon/exitBattle.js');
var acClearFreezeTime = require('./actCarbon/clearFreezeTime.js');
var acGetCarbonStatus = require('./actCarbon/getCarbonStatus.js');

module.exports = function (app) {
    return new Handler(app);
};

var Handler = function (app) {
    this.app = app;
};

/**
 * 发起挑战
 */
Handler.prototype.enterBattle = function (msg, session, next) {
    acEnterBattle(msg, session, next);
};

/**
 * 结束战斗
 */
Handler.prototype.exitBattle = function (msg, session, next) {
    acExitBattle(msg, session, next);
};

/**
 * 清除CD
 */
Handler.prototype.clearFreezeTime = function (msg, session, next) {
    acClearFreezeTime(msg, session, next);
};

/**
 * 查询开启的副本
 */
Handler.prototype.getCarbonStatus = function (msg, session, next) {
    acGetCarbonStatus(msg, session, next);
};
